
def spilt():
    path = '/home/username/data/text.txt'
 
    path.split("/")
 
    ["home","username","data","text.txt "]
 
    ## 而使用rsplit：
 
    path.rsplit("/",1)
 
    # ["/home/username/data","text.txt "]

def main():
    str1=[
        {"url":'''"1.jpg"''',"alt":"实我"},{"url":"2.jpg","alt":"第二"}
    ]
    str2 = ','.join(str(i) for i in str1)
    print(str2)

if __name__ == '__main__':
        main()